package com.example.zpc.file.util;

/**
 * 文件类型枚举 
 * @author JebySun
 *
 */

//Dick:已阅读
public enum FileType {
	
	//注：枚举写在最前面，否则编译出错。
	E_PICTURE("picture", new String[] {"jpg", "jpeg", "png", "bmp", "gif"}),
	E_AUDIO("audio", new String[] {"ac3", "m4a", "wav", "aac", "mp3", "wma", "ape"}),
	E_VIDEO("video", new String[] {"3gp", "mov", "mp4", "rmvb", "rm", "avi", "flv", "mkv", "wmv", "f4v", "mpg", "mpeg", "m4v"}),
	E_TXT("txt", new String[] {"txt"}),
	E_HTML("html", new String[] {"htm", "html", "xhtml", "shtml"}),
	E_PDF("pdf", new String[] {"pdf"}),
	E_WORD("word", new String[] {"doc", "docx"}),
	E_PPT("ppt", new String[] {"ppt", "pptx" }),
	E_EXCEL("excel", new String[] {"xls", "xlsx"}),
	E_APK("apk", new String[] {"apk"});
	
	public static final String PICTURE = "picture";
	public static final String AUDIO = "audio";
	public static final String VIDEO = "video";
	public static final String TXT = "txt";
	public static final String HTML = "html";
	public static final String PDF = "pdf";
	public static final String WORD = "word";
	public static final String PPT = "ppt";
	public static final String EXCEL = "excel";
	public static final String APK = "apk";
	
	private String fileCategory;
	private String[] fileExtensions;
	
	//Dick：枚举的构造方法为私有的
	private FileType(String category, String[] extensions) {
		this.fileCategory = category;
		this.fileExtensions = extensions;
	}
	//get方法
	public String getFileCategory() {
		return fileCategory;
	}

	public String[] getFileExtensions() {
		return fileExtensions;
	}
	

}
